package com.woniuxy.entity;

public class Books {
    int id;
    String name;//书名
    int userid;
    int total;//书本的总数 包含 已借出的书
    int lasttotal;//剩余的未借出的书
    int code;//数据的条形码编码
    int librayid;//对应图书馆的id  万一学校有多个图书馆呢？
    Library libray;//对应图书馆的详细信息
    double deposit;//押金金额

    public Books() {
    }

    public Books(String name, int userid, int total, int lasttotal, int code, int librayid, double deposit) {
        this.name = name;
        this.userid = userid;
        this.total = total;
        this.lasttotal = lasttotal;
        this.code = code;
        this.librayid = librayid;
        this.deposit = deposit;
    }

    public Books(int id, String name, int userid, int total, int lasttotal, int code, int librayid, double deposit) {
        this.id = id;
        this.name = name;
        this.userid = userid;
        this.total = total;
        this.lasttotal = lasttotal;
        this.code = code;
        this.librayid = librayid;
        this.deposit = deposit;
    }

    public Books(int id, String name, int userid, int total, int lasttotal, int code, int librayid, Library libray, double deposit) {
        this.id = id;
        this.name = name;
        this.userid = userid;
        this.total = total;
        this.lasttotal = lasttotal;
        this.code = code;
        this.librayid = librayid;
        this.libray = libray;
        this.deposit = deposit;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getLasttotal() {
        return lasttotal;
    }

    public void setLasttotal(int lasttotal) {
        this.lasttotal = lasttotal;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getLibrayid() {
        return librayid;
    }

    public void setLibrayid(int librayid) {
        this.librayid = librayid;
    }

    public double getDeposit() {
        return deposit;
    }

    public void setDeposit(double deposit) {
        this.deposit = deposit;
    }

    @Override
    public String toString() {
        return "Books{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", userid=" + userid +
                ", total=" + total +
                ", lasttotal=" + lasttotal +
                ", code=" + code +
                ", librayid=" + librayid +
                ", libray=" + libray +
                ", deposit=" + deposit +
                '}';
    }
}
